<template>
	<view class="tabbar row-between">
		<view :class="['tabbar-item flex1 center', type == 'index' ? 'tabbar-item-sel' : '']" @click="to('/pages/index/index')">首页</view>
		<view :class="['tabbar-item flex1 center', type == 'order' ? 'tabbar-item-sel' : '']" @click="to('/pages/order/index')">订单</view>
		<view :class="['tabbar-item flex1 center', type == 'mine' ? 'tabbar-item-sel' : '']" @click="to('/pages/mine/index')">我</view>
	</view>
</template>

<script setup>
const props = defineProps({
	type: {
		type: String,
		default: 'index'
	}
});

function to(url) {
	uni.switchTab({
		url
	});
}
</script>

<style lang="scss">
.tabbar {
	width: 750rpx;
	height: 130rpx;
	background-color: #fff;
	position: fixed;
	bottom: 0;
	left: 0;
	z-index: 999;
	// padding: 0 96rpx 0 80rpx;
	box-shadow: 8rpx 8rpx 10px 0 rgba(0, 0, 0, 0.25);

	&-item {
		height: 130rpx;
		font-weight: 500;
		font-size: 30rpx;
		color: #796300;
	}
	&-item-sel {
		font-weight: bold;
		font-size: 30rpx;
		color: #463800;
	}
}
</style>
